package com.donglan.pethome.user.mapper;

import com.donglan.pethome.basic.mapper.BaseMapper;
import com.donglan.pethome.user.domain.User;
import com.donglan.pethome.user.domain.WechatUser;
import org.apache.ibatis.annotations.Param;

/**
 * @Author: zhangdonghui
 * @Date: 2022/1/21 14:29
 */
public interface WechatUserMapper extends BaseMapper<WechatUser> {
    
    /*
     * 功能描述 通过openid查询微信用户
     * @author zhangdonghui
     * @date 2022/1/21 14:39
     * @param openid 
     * @return com.donglan.pethome.user.domain.WechatUser
     */
    WechatUser loadByOpenid(String openid);

    /*
     * 功能描述 绑定微信，将userid更新到根据openid查找到的数据表行中
     * @author zhangdonghui
     * @date 2022/1/22 16:18
     * @param binderUser
     * @param openid
     * @return void
     */
    void updateByOpenid(@Param("user") User binderUser, @Param("openid") String openid);
}
